﻿using System;
using System.Web.Mvc;
using CRM.Database.Model;

namespace CRM.Controllers
{
    public class EquipmentComboboxController : Controller
    {
        //
        // GET: /EquipmentCombobox/

        public ActionResult Index(EquipmentTypes equipmentTypes)
        {

            return View(equipmentTypes);
        }

        public ActionResult EquipmentTypesPartial()
        {
            return PartialView("EquipmentTypesPartial");
        }

        public ActionResult VendorsPartial()
        {
            throw new NotImplementedException();
            //int equipmentType = (Request.Params["EquipmentType"] != null) ? int.Parse(Request.Params["EquipmentType"]) : -1;
            //if (equipmentType == -1) return PartialView("VendorsPartial", DB.EquipmentTypesActive.First());
            //return PartialView("VendorsPartial", DB.GetEquipmentTypebyId(equipmentType));
        }

        public ActionResult ModelsPartial()
        {

            throw new NotImplementedException();
           // int vendors=0;
           // if (Request.Params["Vendors"] != null)
           // {
           //     int.TryParse(Request.Params["Vendors"], out vendors);
           // }
           //// vendors=(Request.Params["Vendors"] != null) ? int.Parse(Request.Params["Vendors"]) : -1;
           // if (vendors == 0) return PartialView("ModelsPartial", DB.VendorsActive.First());
           // return PartialView("ModelsPartial", DB.GetVendorbyId(vendors));
        }



    }
}
